package com.vhall.component.entity.account.vo;

import com.vhall.component.framework.common.annotation.ParamName;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * Admin-修改用户信息
 *
 * @author guoxin.wang
 * @date 2021/7/30 18:25
 */
@Data
public class AdmAccountEditReqVO implements Serializable {

    private static final long serialVersionUID = -4994005333390920368L;

    @NotNull(message = "account_id参数错误")
    @ParamName("account_id")
    private Integer accountId;

    @NotBlank(message = "phone不能为空")
//    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式有误")
    private String phone;

    @NotBlank(message = "username参数错误")
    @ParamName("username")
    private String userName;

    @NotBlank(message = "nickname参数错误")
    @ParamName("nick_name")
    private String nickName;

    @ParamName("type")
    @Range(min = 1, max = 2, message = "type只能是1,2")
    private Integer type;

}
